<script>
	export default {
		data() {
			return {
				areaList:[
					{
						value:"+86",
						area:"中国"
					},
					{
						value:"+852",
						area:"中国香港"
					},
					{
						value:"+853",
						area:"中国澳门"
					},
					{
						value:"+886",
						area:"中国台湾"
					},
					{
						value:"+355",
						area:"阿尔巴尼亚"
					},
					{
						value:"+213",
						area:"阿尔及利亚"
					},
					{
						value:"+93",
						area:"阿富汗"
					},
					{
						value:"+54",
						area:"阿根廷"
					},
					{
						value:"+971",
						area:"阿拉伯联合酋长国"
					},
					{
						value:"+968",
						area:"阿曼"
					},
				],
				isChecked:false,
				ipt:'',
				isShow:false
			}
		},
		methods: {
			goToUser(){
				if(!this.isChecked){
					return
				}else if(!/^1[3-9]\d{9}$/.test(this.ipt)){
					return
				}else{
						uni.switchTab({
					url:'/pages/recommend/recommend'
				})
				}
			},
			del(){
				this.ipt=''
			}
		}
	}
</script>
<template>
	<view class="container">
		<view style="padding-top: 80px;">
			<view class="pic">
				<img src="../../static/login/网易云音乐.png"/>
			</view>
		</view>
		<view class="log">中国联通提供认证服务</view>
		<view class="phone">
			<view>
				<select style="border:none">
						<option :value="item.value" v-for="item in areaList">{{item.area}}</option>
				</select>
			</view>
			<view style="width:1rpx,height:10rpx,background-color: black;"></view>
			<view class="ipt">
				<input type="text" v-model="ipt" placeholder="输入手机号">
			</view>
			<img src="../../static/login/删除.png" @click="del"/>
		</view>
		<view class="bigBt" @click="goToUser">
			<button>一键登录<span>推荐</span></button>	
		</view>
		<view class="precaution">
			<label>
				<checkbox value="cb" :checked="isChecked" @click="isChecked=!isChecked"/>
				我已阅读并同意<a href="#">《服务条款》，《隐私政策》，《中国联通认证服务协议》</a>
			</label>
		</view>
		<view class="log" @click="isShow=!isShow" style="color: #fff;font-size: 14px;">上次登录</view>
		<view class="log-type" >
			<ul v-if="isShow">
				<li><img src="../../static/login/微信.png"></li>
				<li><img src="../../static/login/qq.png"></li>
				<li><img src="../../static/login/新浪微博.png"></li>
				<li><img src="../../static/login/网易.png"></li>
			</ul>
			<ul v-else></ul>
		</view>
		<view class="question">
			<span>登录遇到问题</span>
			<span>|</span>
			<span>立即体验</span>
		</view>
	</view>
</template>



<style scoped>
*{
	margin: 0 auto;
}
.container{
	background-color:#1f1c23;
}
.pic{
	width: 150px;
	height: 150px;
	display: flex;
	background-color: #f12a25;
	border-radius: 50%;
	margin-bottom: 80px;
}
.pic img{
	margin-top: 16px;
	width: 80%;
	height: 80%;
}
.phone{
	display: flex;
	width: 360px;
	height: 50px;
	background-color: #2c252d;
	line-height: 50px;
	border-radius: 10px;
	margin: 0 auto;
}
.ipt{
	height: 30px;
	line-height: 30px;
	margin-top: 15px;
	/* border: 1px solid black; */
	margin-left: 20px;
}
.ipt input{
	border:none;
	width:160px;
	color: #eef0ed;
	/* height: 40px; */
	/* display: inline; */
	
}
.phone img{
	width: 20px;
	height: 20px;
	margin-top: 15px;
}
.bigBt button{
	width: 360px;
	height: 50px;
	margin: 40px auto ;
	border-radius: 20px;
	background-color: red;
	color: #ebebeb;
	position: relative;
}
.bigBt span{
	height: 15px;
	width: 26px;
	line-height: 15px;
	font-size: 10px;
	background-color:#fe6c72;
	border-radius: 10px;
	/* width: 20px; */
	padding:2px;
	position: absolute;
	left: 222px;
	top: 15px;
	
}
.precaution{
	width: 340px;
	color: #5d5a61;
}
.precaution a{
	color:#5f708d
}
.uni-checkbox-input{
	border-radius: 10px;
}
.log{
	margin: 10px auto;
	color: #877d86;
	text-align: center
}
.log-type{
	width: 300px;
	margin: 20px auto;
}
.log-type ul{
	list-style: none;
	display: flex;
	padding-left: 0px;
	height: 40px;
}
.log-type li{
	width: 40px;
	height: 40px;
	background-color:#2c2e38;
	border-radius: 50%;
}
.log-type img{
	width: 30px;
	height: 30px;
	margin-left: 5px;
	margin-top: 5px;
}
.question{
	color: #5d5a61;
	width: 240px;
		height: 50px;
}
.question span{
	padding: 10px;
}
</style>
